<template>
  <div>
    <h1>vue-xlsx-table</h1>
    <vue-xlsx-table @on-select-file="handleSelectedFile">上传xlsx文件转json</vue-xlsx-table>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  created() {},
  mounted() {},
  methods: {
    handleSelectedFile(convertedData) {
      console.log(convertedData);
      var body = convertedData.body;
      console.log(JSON.stringify(body));
      for (var index = 0; index < body.length - 1; index++) {
        for (var index1 = index + 1; index1 < body.length; index1++) {
          if (body[index].School_Semester == body[index1].School_Semester) {
            if (body[index].CollegeId == body[index1].CollegeId) {
              if (body[index].Schedule_Weekly == body[index1].Schedule_Weekly) {
                if (body[index].Schedule_Week == body[index1].Schedule_Week) {
                  if (body[index].Schedule_What == body[index1].Schedule_What) {
                    if (body[index].WorkerId == body[index1].WorkerId) {
                      if (
                        body[index].Schedule_Place ==
                        body[index1].Schedule_Place
                      ) {
                        if (body[index].CourseId == body[index1].CourseId) {
                          if (body[index].ClassId == body[index1].ClassId) {
                            console.log(
                              body[index].ScheduleId +
                                "与" +
                                body[index1].ScheduleId +
                                "完全冲突"
                            );
                          } else {
                            console.log(
                              body[index].ScheduleId +
                                "与" +
                                body[index1].ScheduleId +
                                ",School_Semester,CollegeId,Schedule_Weekly,Schedule_Week,Schedule_What,WorkerId,Schedule_Place,CourseId冲突"
                            );
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
};
</script>

<style scoped >
</style>
